package com.example.baselibrary.utlis

// 在 Kotlin 文件中
import com.example.baselibrary.utlis.CompleteACache
import android.content.Context

object AppCache {
    private var instance: CompleteACache? = null

    fun init(context: Context) {
        instance = CompleteACache.Builder(context)
            .setCacheName("AppCache")
            .setConfig(
                CompleteACache.Config()
                    .setMaxMemorySize(20 * 1024 * 1024)
                    .setMaxDiskSize(200 * 1024 * 1024)
                    .setHumanReadable(true)
                    .setWriteDelay(1000)
            )
            .build()
    }

    fun get(): CompleteACache? = instance
}
